<template>
	<div class="swiper">
		<swiper :options="swiperOption">
		    <!-- slides -->
		    <swiper-slide v-for="item of this.swiperList" :key="item.id">
		    	<img class="swiper-img" :src="item.imgUrl" alt="">
		    </swiper-slide>
		    <!-- Optional controls -->
		    <div class="swiper-pagination"  slot="pagination"></div>
	  </swiper>
	</div>
</template>
<script>
export default{
	name: 'HomeSwiper',
	props: {
		swiperList: Array
	},
	data () {
		return {
			swiperOption: {
				autoplay: true,
				loop:true,
          		pagination: {
            		el: '.swiper-pagination'
          		}
        	}
		}
	}

}
</script>

<style lang="stylus" scoped>
	.swiper >>> .swiper-pagination-bullet-active
		background: #fff
	.swiper
		overflow hidden
		width 100%
		height 0
		padding-bottom 26.67%
		.swiper-img
			width 100%
</style>